package com.tiancheng.trade.settlement.service.order;

import com.tiancheng.trade.commom.core.data.PageInfo;
import com.tiancheng.trade.settlement.bo.ServiceAmountCountBO;
import com.tiancheng.trade.settlement.bo.ServiceDetailCountExportBO;
import com.tiancheng.trade.settlement.bo.ServiceDetailCountRequestBO;
import com.tiancheng.trade.settlement.bo.ServiceDetailCountResBO;
import com.tiancheng.trade.settlement.model.order.SubOrder;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;

/**
 * 主订单service
 */
public interface ISubOrderService {

    List<SubOrder> findByOrderId(String orderId);

    List<SubOrder> findBySubOrderIds(Collection<String> subOrderIds);

    List<SubOrder> findByOrderIdAndSubOrderIds(String orderId, List<String> subOrderIds);

    /**
     * 订单数据统计汇总查询
     *
     * @param year  {@link Integer} 年份
     * @param month {@link String} 月份
     * @return {@link List< ServiceAmountCountBO >}
     */
    List<ServiceAmountCountBO> serviceAmountCount(Integer year, String month);

    /**
     * 订单数据明细统计查询
     *
     * @param requestBO {@link ServiceDetailCountRequestBO}
     * @return {@link List<ServiceDetailCountResBO>}
     */
    PageInfo<ServiceDetailCountResBO> serviceDetailCountPage(ServiceDetailCountRequestBO requestBO);

    /**
     * 订单数据明细统计导出
     *
     * @param exportBO {@link ServiceDetailCountExportBO}
     * @param request  {@link HttpServletRequest}
     * @param response {@link HttpServletResponse}
     */
    void serviceDetailCountExport(ServiceDetailCountExportBO exportBO, HttpServletRequest request, HttpServletResponse response) throws Exception;
}
